import request from '@/utils/request'

// 查询出库单列表
export function listOutbound(query) {
  return request({
    url: '/system/outbound/list',
    method: 'get',
    params: query
  })
}

// 查询出库单详细
export function getOutbound(containerNumber) {
  return request({
    url: '/system/outbound/' + containerNumber,
    method: 'get'
  })
}

// 新增出库单
export function addOutbound(data) {
  return request({
    url: '/system/outbound',
    method: 'post',
    data: data
  })
}

// 修改出库单
export function updateOutbound(data) {
  return request({
    url: '/system/outbound',
    method: 'put',
    data: data
  })
}

// 删除出库单
export function delOutbound(consignmentId) {
  return request({
    url: '/system/outbound/' + consignmentId,
    method: 'delete'
  })
}
//审核
export function updateAudit(containerNumbers) {
  return request({
    url: '/system/outbound/audit/' + containerNumbers,
    method: 'put',
  })
}
//反审核
export function updateUnAudit(containerNumbers) {
  return request({
    url: '/system/outbound/unaudit/' + containerNumbers,
    method: 'put',
  })
}
